<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
/**
 * @package
 * @file                 $RCSfile: init.php,v $
 * @version              $Revision: 1.0 $
 * @modifiedby           $Author: handaoliang $
 * @lastmodified         $Date: 2010/03/15 15:08:19 $
 * @copyright            Copyright (c) 2010, TinyTui2
**/
if(!defined("SYSTEM_DIR")){
    define("SYSTEM_DIR",dirname(dirname(dirname(__FILE__))));
}
$comm_config_file = SYSTEM_DIR."/conf/config.php";
if(!file_exists($comm_config_file)){
    echo "Error,No such configs files in Web Apps Init files";
    exit;
}
require_once($comm_config_file);

require_once(BASE_LIB_DIR.'/smarty/smartyTemplate.class.php');
require_once(BASE_LIB_DIR.'/global_func.php');

//formate smarty object.
$smarty = &new smartyTemplate(BASE_TEMPLATES_DIR,SMARTY_TEMPLATES_C,SMARTY_CACHE_DIR);
//init smarty variables.
$smarty->assign("charset",SYSTEM_CHARSET);
$smarty->assign("lang",SYSTEM_LANG);
$smarty->assign("res",RES_PATH);
$smarty->assign("www",WWW_PATH);
?>
